package com.example.quartz;

import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.Date;

/**
 * Created by Administrator on 2019/8/19.
 */
@Component
@Configuration
@EnableScheduling
public class ScheduleTask {

//    @Scheduled(cron="0/5 * * * * ?")
//    private void configureTasks1() {
//        System.err.println("执行静态定时任务时间1: " + new Date());
//    }
//
//    @Scheduled(cron="0/6 * * * * ?")
//    private void configureTasks2() {
//        System.err.println("执行静态定时任务时间2: " + new Date());
//    }
}
